﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace SignalrClientTest
{
    public class LogTextWriter : TextWriter
    {
        TextBoxBase _output = null;
        public LogTextWriter(TextBoxBase output)
        {
            _output = output;
        }
        public override Encoding Encoding
        {
            get
            {
                return System.Text.Encoding.UTF8;
            }
        }

        public override void WriteLine(string value)
        {
            _output.AppendText(value + Environment.NewLine);
        }
    }
}
